package com.dynamicPro.estadisticas;

// Diff -- text file difference utility.
// See full docu-comment at beginning of Diff class.

// $Id: Diff.java,v 1.8 2005/03/26 18:05:38 ian Exp $

import java.io.*;

/** This is the info kept per-file.     */
public class FileInfo {		

	static final int MAXLINECOUNT = 20000;

	BufferedReader file;	/* File handle that is open for read.  */
	public int maxLine;	/* After input done, # lines in file.  */
	Nodo symbol[]; /* The symtab handle of each line. */
	int other[]; /* Map of line# to line# in other file */
                                /* ( -1 means don't-know ).            */
				/* Allocated AFTER the lines are read. */

	/**
	 * Normal constructor with one filename; file is opened and saved.
	 */
	public FileInfo( String filename ) {
		symbol = new Nodo [ MAXLINECOUNT+2 ];
		other  = null;		// allocated later!
		try {
			file = new BufferedReader(
				new FileReader(filename));
		} catch (IOException e) {
			  System.err.println("no se puede leer el archivo " + filename );
			  System.exit(1);
		}
	}
	// This is done late, to be same size as # lines in input file.
	void alloc() {
		other  = new int[symbol.length + 2];
	}
}

